package com.brush.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.brush.app.domain.AppUser;
import com.brush.app.mapper.AppUserMapper;
import com.brush.app.service.AppUserService;
import org.springframework.stereotype.Service;

/**
 * @author tonneyyy
 * @description 针对表【app_user(手机端用户)】的数据库操作Service实现
 * @createDate 2024-09-28 15:01:49
 */
@Service
public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, AppUser>
        implements AppUserService {

    /**
     * 根据手机号查询用户信息
     *
     * @param phone
     * @return
     */
    @Override
    public AppUser findByPhone(String phone) {
        LambdaQueryWrapper<AppUser> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(AppUser::getPhone, phone);
        return this.getOne(queryWrapper);
    }
}




